<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>Test Adapt</title>
  <script src="../../../lib/prototype.js" type="text/javascript"></script>
  <script src="../../../lib/effects.js" type="text/javascript"></script>  
  <script src="../../../dist/window.js" type="text/javascript"></script>

  <link href="../../../themes/window/window.css" rel="stylesheet" type="text/css">
  <link href="../../../themes/window/mac_os_x.css" rel="stylesheet" type="text/css">
  <link href="../../../themes/shadow/mac_shadow.css" rel="stylesheet" type="text/css">
 
  <style type='text/css'>
  body { 
    background: url('../../assets/body_bg.png') repeat; 
  } 
  h2, h3 {
    font-size:18px;
    line-height:25px;
    font-weight:normal;      
    margin:0;
  }     
  h3 {
    float:left;
    width:250px;
    height:250px;
  }
  </style>
  
</head>
<body>     
  
<script type="text/javascript">
  function runTest() {     
    var blablabla = "bla bla bla ".times(40)
    
    w1 = new UI.Window({
      theme: "mac_os_x",
      width: 230,
      height: 330,
      top: 10,
      left: 50,
      shadow:true,
      resizable: true,
			superflousEffects: false
    });
      
    w1.setContent("<h2>" + blablabla + "</h2>").show();
    w1.adapt.bind(w1).delay(1);
    
    w2 = new UI.Window({
      theme: "mac_os_x",
      width: 200,
      height: 330,
      top: 10,
      left: 450,
      shadow:true,
      resizable: true
    });
    
    w2.setContent("<h3>" + blablabla + "</h3>").show();
    w2.adapt.bind(w2).delay(2);  
    
    (function() {
      w2.setSize(200, 200, true).center({auto: true});
      w2.adapt.bind(w2).delay(1);  
    }).delay(3)
  }  
  Event.observe(window, "load", runTest);
</script>

</body>
</html>
